//
//  User.h
//  MM
//
//  Created by 郑渊文 on 5/21/15.
//  Copyright (c) 2015 王晨辉. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "APIClient.h"
#import "BaseModel.h"

@interface UserModel : BaseModel

@property (strong, nonatomic) NSString *userID;
@property (strong, nonatomic) NSString *name;
@property (strong, nonatomic) NSString *password;

//登陆
+ (NSURLSessionDataTask *)getUser:(NSDictionary *)paramDic
                          success:(void (^)(UserModel *user))block
                           failed:(void (^)(NSError *error))error;

//注册
+ (NSURLSessionDataTask *)getCheckNum:(NSDictionary *)paramDic
                             withBlock:(void (^)(NSString *checkNum, NSError *error))block;


//注销
+ (void)logoutAccount;
///获取userdefault中存的用户名 和钥匙串中密码
+ (void)getAccount:(void (^)(NSString *username,NSString *password))block;
//存储用户名userdefault ,密码到钥匙串
+ (void)saveAccount:(NSString *)name andPassword:(NSString *)password;


@end
